package com.xci.sys.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelIgnore;
import com.xci.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 系统应用程序
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "系统应用程序")
public class SysApp extends BaseEntity {
    /**
     * 应用标识
     */
    @Excel(name = "应用标识", width = 30d)
    @ApiModelProperty(value = "应用标识", required = true, position = 1)
    private String id;

    /**
     * 应用名称
     */
    @NotBlank(message = "应用名称不能为空")
    @Length(max = 100, message = "应用名称不能超过{max}个字符")
    @Excel(name = "应用名称", width = 30d)
    @ApiModelProperty(value = "应用名称", required = true, position = 2)
    private String name;

    /**
     * 启用状态 [启用_1,禁用_0]
     */
    @NotNull(message = "状态不能为空")
    @Excel(name = "状态", replace = {"启用_true", "禁用_false"})
    @ApiModelProperty(value = "启用状态 [启用_1,禁用_0]", required = true, position = 4)
    private Boolean status;

    /**
     * 备注
     */
    @Length(max = 500, message = "备注不能超过{max}个字符")
    @Excel(name = "备注", width = 40d)
    @ApiModelProperty(value = "备注", position = 100)
    private String remark;
}